package platform.ui.charts;

import java.util.HashMap;
import java.util.Map;

/**
 * 
 * 
 * @author   wg
 * @version ChartsConstantMap.java Apr 7, 2010  12:27:53 AM 
 *
 */
public class ChartsConstantMap {
	private static Map<String, String> swfMap=new HashMap<String, String>();
	static{
		swfMap.put("Area2D", "FCF_Area2D.swf");
		swfMap.put("Bar2D", "FCF_Bar2D.swf");
		swfMap.put("Candlestick", "FCF_Candlestick.swf");
		swfMap.put("Column2D", "FCF_Column2D.swf");
		swfMap.put("Column3D", "FCF_Column3D.swf");
		swfMap.put("Doughnut2D", "FCF_Doughnut2D.swf");
		swfMap.put("Funnel", "FCF_Funnel.swf");
		swfMap.put("Gantt", "FCF_Gantt.swf");
		swfMap.put("Line", "FCF_Line.swf");
		swfMap.put("MSArea2D", "FCF_MSArea2D.swf");
		swfMap.put("MSBar2D", "FCF_MSBar2D.swf");
		swfMap.put("MSColumn2D", "FCF_MSColumn2D.swf");
		swfMap.put("MSColumn2DLineDY", "FCF_MSColumn2DLineDY.swf");
		swfMap.put("MSColumn3D", "FCF_MSColumn3D.swf");
		swfMap.put("MSColumn3DLineDY", "FCF_MSColumn3DLineDY.swf");
		swfMap.put("MSLine", "FCF_MSLine.swf");
		swfMap.put("Pie2D", "FCF_Pie2D.swf");
		swfMap.put("Pie3D", "FCF_Pie3D.swf");
		swfMap.put("StackedArea2D", "FCF_StackedArea2D.swf");
		swfMap.put("StackedBar2D", "FCF_StackedBar2D.swf");
		swfMap.put("StackedColumn2D", "FCF_StackedColumn2D.swf");
		swfMap.put("StackedColumn3D", "FCF_StackedColumn3D.swf");
	}
	/**
	 * 
	 * 
	 * @param type
	 * @return
	 */
	static String getSwffileNameByType(String type){
		StringBuilder i18n = new StringBuilder();
//		i18n.append("?PBarLoadingText='正在加载图表,请稍候...'");
//		i18n.append("?XMLLoadingText='正在获取数据,请稍候...'");
//		i18n.append("&ParsingDataText='正在解析数据,请稍候...'");
//		i18n.append("&ChartNoDataText='没有数据可供显示...'");
//		i18n.append("&RenderingChartText='正在绘制图表,请稍候...'");
//		i18n.append("&LoadDataErrorText='加载数据时发生错误...'");
//		i18n.append("&InvalidXMLText='无效的XML数据...'");
		if(null != type){
			return swfMap.get(type)+i18n.toString();
		}
		return null;
	}
}
